<?php
/*
Overmundo, cultura de todo o Brasil
Desenvolvido pela Tecnopop para o Núcleo de Idéias Movimento
Copyright (C) 2006  Núcleo de Idéias Movimento

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/

header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/css; charset=iso-8859-1"); 


require('../lib/class.site.php');
require('../lib/class.overmundo.php');
require('../lib/class.conecta.php');
//require('../lib/class.colaborador.php');


if ($_GET["estado"]) {
	$siglaEstado = $_GET["estado"];
}



	$minhaConexao = new Conecta();
	$meuSite = new Overmundo();
	$meuSite->linkid = $minhaConexao->linkid;
//	echo "GET " . $_GET["selec"];
	if (!($valorSelecionado = $_GET["selec"])) {
		$valorSelecionado = "--NOP--";
	}
	//if ($siglaEstado == "WW") {
?>
<!--<select name='slcCodMunicipio'><option value='<?=$meuSite->OvermundoLocalidadeInternacional()?>' selected>Cidade no exterior</option>
</select> <img src="../images/indicador_fdo_branco.gif" width="16" height="16" id="carregando" class="carregandoH">
-->
<?		
	//} else {
		$resMunicipios = $meuSite->OvermundoListaMunicipios("estadoMunicipio = '$siglaEstado'", " nomeMunicipio ");
?>
<select name='slcCodMunicipio'><option value='0' selected>Selecione...</option>
<?
 	while ($row = mysql_fetch_array($resMunicipios)){
        $meuSite->insertOption($row["codMunicipio"] , $row["nomeMunicipio"], 1, $valorSelecionado);
        //echo $row["codMunicipio"] .  $row["nomeMunicipio"] . "<BR>";
	}
?>
</select> <img src="../images/indicador_fdo_branco.gif" width="16" height="16" id="carregando" class="carregandoH">
<?
	//}
?>